package 易立德.判断一个整数是不是回文串;

public class Main {

    public  boolean judge(int num){
        if (num<=0){
            num+=-2*num;
        }
        String str = String.valueOf(num);
        for (int i = 0; i <= str.length()/2; i++) {
            if ((i<=str.length()-1-i)&&str.charAt(i)!=str.charAt(str.length()-1-i)){
                return false;
            }
        }

        return true;
    }
}
